<?php include_once("DataProvider.php")?>
<!doctype html>
<!doctype html> 
<html class="no-js"><!-- InstanceBegin template="/Templates/loaisanpham.dwt.php" codeOutsideHTMLIsLocked="false" -->
		<!--HEADER -->
	<?php
	include_once("header.php");
	?>
	
		<!-- ENDS HEADER -->
		<!-- InstanceBeginEditable name="EditRegion1" -->

		<!-- MAIN -->

        <div id="main">
        	<div class="bannerleft" style=" width:15%; position:fixed;top:450px;"> 
            <img src="img/bannertruot.gif" style="width:100%;"/>
            </div>
            <div class="bannerleft" style=" width:15%; position:fixed; top:450px; right:10px;"> 
            <img src="img/bannertruot.gif" style="width:100%;"/>
            </div>
            <script type="text/javascript">
			$(window).scroll(function(){
				if($(window).scrollTop()==0)
				{
					$('.bannerleft').animate({'top':'450px'});	
				}
				if($(window).scrollTop()>0)
					$('.bannerleft').css({'top':'100px'});
				}
			);
            </script>
          <div class="wrapper cf">
            <!-- portfolio content-->
            <div id="portfolio-content" class="cf">
              <ul id="filter-buttons">
                <li><a href="#" data-filter=".ngoaithat"><h4>TẤT CẢ</h4></a></li>
              </ul>
              <!-- Filter container -->
				<div id="filter-container" class="cf" style="overflow: hidden; position: relative; width:670px;margin-left:10%;">
				 <?php
                   			$sql="select * from sanpham sp, loaisanpham lsp where sp.id_danhmuc=lsp.id_loaisanpham";
							$result=DataProvider::ExecuteQuery($sql);
							while($row=mysql_fetch_array($result))
							{
								if($row["data-filter"]!=NULL)
								{


					?>

					<figure class="<?php echo $row["data-filter"]?>">
						<a href="detail.php?id=<?php echo $row["id_sanpham"]?>" class="thumb"><img src="img/sanpham/<?php echo trim($row["hinhsanpham"]);?>" alt="alt" /></a>
						<figcaption>
							<a href="detail.php?id=<?php echo $row["id_sanpham"]?>" ><h4><?php echo $row["tensanpham"];?></h4>
                            </a>

				<!-- Standard -->
							<br>
							<span class="tinhtrang">Tình trạng: <?php if($row["tinhtrang"]==1){echo "Còn hàng";}else {echo "Hết hàng";}?></span>
                            </figcaption>
					</figure>
                    <?php }}?>
					<!-- <figure class=" print photo">-->



				</div><!-- ENDS Filter container -->
            </div>
            <!-- ENDS featured -->
          </div>
          <!-- ENDS WRAPPER -->
        </div>
        <!-- ENDS MAIN -->
		<!-- InstanceEndEditable -->
		<!-- BEGINS FOOTER -->

<?php
include_once("footer.php");
?>
<!-- ENDS FOOTER -->
		
	</body>
	
	
	
<!-- InstanceEnd --></html>